﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WillBe.Attributes;
using System.Diagnostics;

namespace WillBe.Framework.DefaultImplementations
{
    public class WillBeLoggingErrorsAction : WillBeActionBase<WillBeLoggingErrorsAttribute>
    {
        public override void Do()
        {
            try
            {
                Action.Invoke();
            }
            catch (Exception e)
            {
                Trace.WriteLine(string.Format("logged Exception of : {0}", e));
                throw;
            }
        }
    }
}
